﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OverrideThis.ContactManager.WebSite.Models.PersonEditViewModel>" %>
<%@ Import Namespace="OverrideThis.ContactManager.WebSite.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Person
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>Edit Person</h2>
	<% using (Html.BeginForm()) {%>
		<%: Html.ValidationSummary(true) %>
		<fieldset>
			<legend>Person Details</legend>
			
			<%: Html.EditorFor(model => model.Id) %>    
			<div class="editor-label">
				<%: Html.LabelFor(model => model.Lastname) %>
			</div>
			<div class="editor-field">
				<%: Html.TextBoxFor(model => model.Lastname) %>
				<%: Html.ValidationMessageFor(model => model.Lastname) %>
			</div>
			
			<div class="editor-label">
				<%: Html.LabelFor(model => model.Firstname) %>
			</div>
			<div class="editor-field">
				<%: Html.TextBoxFor(model => model.Firstname) %>
				<%: Html.ValidationMessageFor(model => model.Firstname) %>
			</div>
			
			<div class="editor-label">
				<%: Html.LabelFor(model => model.CountryDescription) %>
			</div>
			<div class="editor-field">
				<%: Html.DropDownListFor(model => model.CountryDescription, Model.Country.ToSelectList() ) %>
				<%: Html.ValidationMessageFor(model => model.CountryDescription) %>
			</div>

			<p><input type="submit" value="Save" /></p>
		</fieldset>
	<% } %>
	<div><%: Html.ActionLink("Back to List", "Index") %></div>
</asp:Content>